package com.hawthorn.mq.controller;

import com.hawthorn.mq.service.OperationLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>todo 操作日志控制类</p>
 * @author: andy.ten@tom.com | xukaixing@hotmail.com
 * @created: 2022/7/10 11:12
 * @version v1.0.1
 * @copyright: Copyright (c)  andyten
 */
@Api(tags = {"mq-provider-operation-logs"})
@RestController
@RequestMapping("/operationLog")
public class OperationLogController
{
  @Autowired
  private OperationLogService operationLogService;

  /**
   * <p>todo 发送操作日志</p>
   * @author: andy.ten@tom.com ｜ xukaixing@hotmail.com
   * @date: 2022/7/10 11:14
   * @version: 1.0.1
   */
  @ApiOperation(value = "发送->发送操作日志", notes = "发送->发送操作日志")
  @ApiImplicitParams({
      @ApiImplicitParam(name = "msgInfo", value = "用户信息", dataTypeClass = Map.class),
  })
  @PutMapping("/sendOperationLog")
  public void sendOperationLog(@RequestBody Map<String, Object> msgInfo)
  {
    operationLogService.sendOperationLog(msgInfo);
  }
}
